/**
 * @description 个人中心
 */
Rsd.define('Rsd.hermit.pages.AccountPage', {
    extend: 'Rsd.hermit.pages.ShopMaster',
    requires: [
        'Rsd.form.Button',
        'Rsd.form.Label',
        'Rsd.form.Link',
        'Rsd.form.CheckBox',
        'Rsd.form.Image',
        'Rsd.control.IframeBox', 
        'Rsd.container.PageContainer',
        'Rsd.control.MenuList'
    ], 
    xtype:'account-page',
    title:'Account',
    content:[ 
        {
            xtype:'container',
            header:false,
            width:'100%',
            height:650,
            layout:'hbox', 
            items:[
                {
                    xtype:'menu-list',
                    margin:'0 50 0 0',
                    label:false,
                    height:500, 
                    width:180,
                    itemXtype:'link',
                    itemClick:'btn_show_page',
                    itemStyle:{height:50,lineHeight:'50px'},
                    itemLabelWidth:'90%',
                    layout:'none', 
                    menu:[
                         {text:"Dashboard",viewType:'Rsd.inner.Dashboard',label:false},
                         {text:"Orders",viewType:'Rsd.inner.OrderListPage',label:false},
                         {text:"Shopping Cart",viewType:'',label:false},
                         {text:"Wishlist",viewType:'',label:false} ,
                         {text:"Payment Method",viewType:'',label:false},
                         {text:"Address",viewType:'',label:false},
                         {text:"Account Details",viewType:'',label:false}
                    ] 
                },
                {
                    xtype:'page-container',
                    //margin:'100 0 0 30',
                    height:'100%', 
                    flex:1,
                    height:500, 
                    style:{
                        //border:'grey 1px solid'
                    },
                    muliti:false,
                    header:{
                        content:'Title',
                        position:'top',
                        height:50,
                        width:'90%',
                        align:'left',
                        style:{
                            borderBottom:'1px grey dotted'
                        }
                    }
                },
            ]
        } 
    ],
    /**
     * 
     */
    constructor: function  AccountPage(config)
    {
         config = config || {};
        this.apply(config);
    },
    
    btn_show_page:function(s,e)
    {
        if(Rsd.isEmpty(s.menu.viewType))
        {
            return;
        }  
        this.content.items[0].items[1].header.element.innerHTML = s.menu.text;
        this.content.items[0].items[1].add(Rsd.create(s.menu.viewType,{
            height:'100%',
            width:'100%'
        }));
    }
});
/**
 * 
 */
Rsd.define('Rsd.inner.Dashboard',{
     extend: 'Rsd.container.Page', 
     items:[
        {
            xtype:'label',
            text:'Hello, Alex Tuntuni (If Not Tuntuni ! Logout) From your account dashboard. you can easily check & view your recent orders, manage your shipping and billing addresses and edit your password and account details.'
        }
     ],
     /**
      * Order	Date	Status	Total	Action
      * @param {*} config 
      */ 
    constructor: function  OrderListPage(config)
    {
         config = config || {};
        this.apply(config);
    },
    /**
     * 
     */
    load:function load()
    {
        this.callParent([{},{}]); 
    }
});
/**
 * 
 */
Rsd.define('Rsd.inner.OrderListPage',{
     extend: 'Rsd.zen.page.ListPage', 
     gridColumns:[
        {
            xtype:'index',
            text:'Index'
        },
        {
            xtype:'string',
            text:'NO.'
        },
        {
            xtype:'string',
            text:'Description'
        },
        {
            xtype:'string',
            text:'Date'
        },
        {
            xtype:'string',
            text:'Status'
        },
        {
            xtype:'string',
            text:'Action'
        }
     ],
     /**
      * Order	Date	Status	Total	Action
      * @param {*} config 
      */ 
    constructor: function  OrderListPage(config)
    {
         config = config || {};
        this.apply(config);
    },
    /**
     * 
     */
    load:function load()
    {
        this.callParent([{},{}]); 
    }
});